<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/13
 * Time: 16:56
 */

namespace app\models;

use yii;
use yii\db\Query;

class OrderModel extends BaseModel
{
    public $table;

    public function __construct()
    {
        $this->table = yii::$app->db->tablePrefix . 'sample_order';
    }

    public function one($where = [])
    {
        $db = new Query();
        return $db->select('*')->from($this->table)->where($where)->limit(1)->one();

    }

    public function all($where = [], $offset = false, $limit = false, $order = false)
    {
        // TODO: Implement all() method.
    }
}